package com.chinasoft.mall.application;

import android.app.Application;
import android.util.Log;
import android.widget.Toast;

import com.chinasoft.mall.R;
import com.chinasoft.mall.framework.BeanCache;
import com.chinasoft.mall.framework.ControllerCenter;
import com.chinasoft.mall.util.SystemSetting;

public class InitApplication extends Application {
	@Override
	public void onCreate() {
		super.onCreate();
		if (!SystemSetting.initStorageDir()) {
			Toast.makeText(getApplicationContext(), R.string.init_error,
					Toast.LENGTH_LONG).show();
		}
		SystemSetting.init(getApplicationContext());
	}

	@Override
	public void onLowMemory() {
		super.onLowMemory();
		BeanCache.getInstance().getResponsdata().clear();
	}
}
